package com.xltt.vehicleControl.util;

import android.content.Context;
import android.view.Gravity;
import android.widget.Toast;

public class ToastUtil {

    public static void show(Context context,String msg){
        Toast toast = Toast.makeText(context, msg, Toast.LENGTH_SHORT);
        //调用一个居中的方法
        toast.setGravity(Gravity.CENTER, 0, 0);
        //显示出来
        toast.show();
    }
}
